<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
<title>图片轮换</title>
	<link rel="stylesheet" href="../css/scroll.css" />
	<script>
		function changetu1(){
			var tu=document.getElementById("photo");
			tu.setAttribute("src","../images/1.gif")
		}
		function changetu2(){
			var tu=document.getElementById("photo");
			tu.setAttribute("src","../images/2.gif")
		}
		function changetu3(){
			var tu=document.getElementById("photo");
			tu.setAttribute("src","../images/3.jpg")
		}
		function changetu4(){
			var tu=document.getElementById("photo");
			tu.setAttribute("src","../images/4.jpg")
		}
		function changetu5(){
			var tu=document.getElementById("photo");
			tu.setAttribute("src","../images/5.gif")
		}
	</script>

</head>

<body>
<div class="scroll">
	<div id="num">
		<a href="#" onclick="changetu1()">1</a>
		<a href="#" onclick="changetu2()">2</a>
		<a href="#" onclick="changetu3()">3</a>
		<a href="#" onclick="changetu4()">4</a>
		<a href="#" onclick="changetu5()">5</a>
	</div>
	<img src="../images/1.gif" alt="图片" id="photo"/>
</div>
</body>
</html>
